"use strict";!function(o,r){if(window.stripeHandler){var i=window.stripeHandler;o(document).ready(function(){o(document).on("wp_quiz_stripe_token",function(e,t){return window.recentStripeToken=t}),o(document).on("click",".wq-js-pay-force-action-stripe-button",function(e){e.preventDefault();var t=o(e.currentTarget),n=t.closest(".wq-quiz");i.open({amount:parseFloat(t.attr("data-amount")),name:r.stripeName,closed:function(){void 0!==window.recentStripeToken&&(n.trigger("wp_quiz_complete_force_action"),delete window.recentStripeToken)}})}),window.addEventListener("popstate",function(){return i.close()})})}}(jQuery,wpQuiz);